package org.bigjava.novelplatform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.bigjava.novelplatform.common.enums.UserRelationType;

import java.io.Serializable;

/**
 * 
 * @TableName user_relation
 */
@TableName(value ="user_relation")
@Data
public class UserRelation implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 被关注用户id
     */
    private Integer focusedId;

    /**
     * 关注者id
     */
    private Integer fansId;

    /**
     * 用户关系类型
     1作者&读者；0其他
     */
    private UserRelationType relationType;

    /**
     * fans_id给focused_id打赏<br />只有relation_type为1时可以打赏
     */
    private Long contribution;

    /**
     * 逻辑删除
     0未删除；1删除
     */
    private Integer deleteState;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}